package com.zyf.service.convert;

import lombok.SneakyThrows;

import net.bramp.ffmpeg.FFmpeg;
import net.bramp.ffmpeg.FFprobe;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

/**
 * @Description TODO
 * @Author lfp
 * @Version 1.0
 */
@Configuration
public class FFmpegConfig {

    @Value("${ffmpeg_path}")
    private  String ffmpeg_path;
    @Bean
    public FFmpeg fFmpeg() throws IOException {
//        return new FFmpeg(ffmpeg_path+"\\ffmpeg.exe");
        return new FFmpeg();
    }

    @Bean
    public FFprobe fFprobe() throws IOException {
//        return new FFprobe(ffmpeg_path+"\\ffprobe.exe");
        return new FFprobe();
    }
}